package com.service.impl;

import com.dao.impl.FavourDaoImpl;
import com.dao.intf.FavourDao;
import com.entity.Favour;
import com.service.intf.FavourService;

import java.util.List;

public class FavourServiceImpl implements FavourService {
    private FavourDao favourDao=new FavourDaoImpl();
    @Override
    public void saveFavour(Integer blogId, Integer userId) {
        favourDao.saveFavour(blogId,userId);
    }

    @Override
    public void deleteFavour(Integer blogId, Integer userId) {
        favourDao.deleteFavour(blogId,userId);
    }

    @Override
    public boolean isFavour(Integer blogId, Integer userId) {
        return favourDao.isFavour(blogId,userId);
    }

    @Override
    public List<Favour> queryFavourByBlogId(Integer blogId) {
        return favourDao.queryFavourByBlogId(blogId);
    }

    @Override
    public Integer queryUserFavour(Integer userId) {
        return favourDao.queryUserFavour(userId);
    }
}
